package cn.clwxy.gdz.dao;

import cn.clwxy.gdz.entity.StudentSubjectRelative;
import cn.clwxy.gdz.util.BaseDao;

public class StudentSubjectDaoImpl extends BaseDao implements StudentSubjectDao
{

	@Override
	public int addStudentSubjectRelative(
			StudentSubjectRelative studentSubjectRelative) {
		String sql="INSERT INTO studentsubjectrrelative VALUE(?,?)";
		return super.update(sql, studentSubjectRelative.getStudentId(),studentSubjectRelative.getSubjectId());
	}

	@Override
	public int deleteStudentSubjectRelative(
			StudentSubjectRelative studentSubjectRelative) {
		String sql="DELETE FROM studentsubjectrrelative WHERE studentId=? AND subjectId=?";
		return super.update(sql, studentSubjectRelative.getStudentId(),studentSubjectRelative.getSubjectId());
	}

}
